package com.bone.workstation.po;

import java.util.Date;

import com.bone.constant.Constant;

/**
 * Module entity. @author MyEclipse Persistence Tools
 */

public class Module implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1167555207470643774L;
	
	// Fields
	private Long moduleId;
	private String moduleName;
	private String moduleCode;
	private String moduleType;
	private String moduleStatus;
	private String url;
	private String icon;
	
	private Date createTime;
	private String description;
	
	private String operator;
	 

	// Constructors

	/** default constructor */
	public Module() {
	}

	/** minimal constructor */
	public Module(String moduleName, String moduleType, Date createTime,
			String moduleCode, String url, String moduleStatus) {
		this.moduleName = moduleName;
		this.moduleType = moduleType;
		this.createTime = createTime;
		this.moduleCode = moduleCode;
		this.url = url;
		this.moduleStatus = moduleStatus;
	}

	/** full constructor */
	public Module(String moduleName, String moduleType, Date createTime,
			String description, String moduleCode, String url, String icon,
			String moduleStatus) {
		this.moduleName = moduleName;
		this.moduleType = moduleType;
		this.createTime = createTime;
		this.description = description;
		this.moduleCode = moduleCode;
		this.url = url;
		this.icon = icon;
		this.moduleStatus = moduleStatus;
	}

	// Property accessors

	
	/**
	 * 
	 * @return
	 */
	public String getModuleStatusZh() {
		return Constant.ACTIVATE_STATUS.getCnName(this.getModuleStatus());
	}
	
	public String getModuleTypeZh() {
		return Constant.COMM_TYPE.getCnName(this.getModuleType());
	}
	
	
	public boolean isNormal() {
		return Constant.ACTIVATE_STATUS.NORMAL.name().equalsIgnoreCase(
				this.moduleStatus);
	}
	
	public boolean isCancel() {
		return Constant.ACTIVATE_STATUS.CANCEL.name().equalsIgnoreCase(
				this.moduleStatus);
	}
	
	public Long getModuleId() {
		return moduleId;
	}

	public void setModuleId(Long moduleId) {
		this.moduleId = moduleId;
	}

	public String getModuleName() {
		return moduleName;
	}

	public void setModuleName(String moduleName) {
		this.moduleName = moduleName;
	}

	public String getModuleCode() {
		return moduleCode;
	}

	public void setModuleCode(String moduleCode) {
		this.moduleCode = moduleCode;
	}

	public String getModuleType() {
		return moduleType;
	}

	public void setModuleType(String moduleType) {
		this.moduleType = moduleType;
	}

	public String getModuleStatus() {
		return moduleStatus;
	}

	public void setModuleStatus(String moduleStatus) {
		this.moduleStatus = moduleStatus;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}
}